WPS Office.apk(点击下载) / odw.java


package defpackage;

import defpackage.ejx;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;

/* renamed from: odw  reason: default package */
public final class odw extends odp {
    public odw(ejz ejz, nos nos) {
        super(ejz, nos);
    }

    private void a(ejw ejw, String str, HashMap<String, List<aago>> hashMap) {
        ejy ejy = ejw.eWo;
        ew.assertNotNull("relations should not be null", ejy);
        int size = ejy.eWv.size();
        for (int i = 0; i < size; i++) {
            List<aago> list = hashMap.get(str);
            ew.assertNotNull("parts should not be null", list);
            for (int i2 = 0; i2 < list.size(); i2++) {
                aago aago = list.get(i2);
                ew.assertNotNull("part should not be null", aago);
                ejx sq = ejy.sq(i);
                if (ejx.a.INTERNAL == sq.eWq) {
                    this.qqd.a(sq, aago);
                } else {
                    aago.ahn(sq.id);
                    aago.bt(sq.eWr.toString(), sq.eWp, sq.id);
                }
            }
        }
    }

    @Override // defpackage.odp
    public final void dnS() throws IOException {
        ejl bbm = this.eWH.bbm();
        ew.assertNotNull("diagram should not be null!", bbm);
        aago dXD = this.qqd.dXD();
        ew.assertNotNull("curPart is not null.", dXD);
        abfo dXG = this.qqd.dXG();
        String str = this.qqd.dXI().get(this.eWH.eWz);
        String eu = bbm.eu();
        if (!(str == null || eu == null)) {
            int i = dXG.CMS + 1;
            dXG.CMS = i;
            abfl a = abfl.a(dXD, i, str);
            ew.assertNotNull("diagramDataPart is not null.", a);
            ew.assertNotNull("diagramDataFilePath is not null.", eu);
            this.qqd.a(eu, a);
            ew.assertNotNull("diagramDataPartRelId is not null.", dXD.b(a));
        }
        int i2 = dXG.CMT + 1;
        dXG.CMT = i2;
        abfk d = abfk.d(dXD, i2);
        ew.assertNotNull("diagramDataPart is not null.", d);
        String eq = bbm.eq();
        ew.assertNotNull("diagramDataFilePath is not null.", eq);
        this.qqd.a(eq, d);
        String b = dXD.b(d);
        ew.assertNotNull("diagramDataPartRelId is not null.", b);
        int i3 = dXG.CMU + 1;
        dXG.CMU = i3;
        abfm e = abfm.e(dXD, i3);
        ew.assertNotNull("diagramLayoutPart is not null.", e);
        String er = bbm.er();
        ew.assertNotNull("diagramLayoutFilePath is not null.", er);
        this.qqd.a(er, e);
        String b2 = dXD.b(e);
        ew.assertNotNull("diagramLayoutPartRelId is not null.", b2);
        abfn f = abfn.f(dXD, dXG.heU());
        ew.assertNotNull("diagramStylePart is not null.", f);
        String es = bbm.es();
        ew.assertNotNull("diagramStyleFilePath is not null.", es);
        this.qqd.a(es, f);
        String b3 = dXD.b(f);
        ew.assertNotNull("diagramStylePartRelId is not null.", b3);
        abfj c = abfj.c(dXD, dXG.heU());
        ew.assertNotNull("diagramColorsPart is not null.", c);
        String ep = bbm.ep();
        ew.assertNotNull("diagramColorsFilePath is not null.", ep);
        this.qqd.a(ep, c);
        String b4 = dXD.b(c);
        ew.assertNotNull("diagramColorsPartRelId is not null.", b4);
        ew.assertNotNull("diagram is not null.", bbm);
        HashMap<String, List<aago>> dXH = this.qqd.dXH();
        ew.assertNotNull("diagramPartMap should not be null", dXH);
        ejw en = bbm.en();
        if (en != null) {
            a(en, bbm.eq(), dXH);
            ejw em = bbm.em();
            if (em != null) {
                a(em, bbm.eu(), dXH);
            }
        }
        this.qqe.i("dgm:relIds", "xmlns:dgm", "http://schemas.openxmlformats.org/drawingml/2006/diagram", "xmlns:r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships", "r:dm", b, "r:lo", b2, "r:qs", b3, "r:cs", b4);
        this.qqe.endElement("dgm:relIds");
    }
}